﻿@model MsForgeReboot.Framework.ViewModels.EventEditModel

@{
    ViewBag.Title = "Edit";
}

@section Header{
    <script src="~/Scripts/ckeditor/ckeditor.js"></script>
    <script src="~/Scripts/bootstrap-fileupload.min.js"></script>
    <script src="~/Scripts/bootstrap-datetimepicker.min.js"></script>
    <link type="text/css" rel="stylesheet" href="~/Content/bootstrap-fileupload.min.css" />
    <link type="text/css" rel="stylesheet" href="~/Content/bootstrap-datetimepicker.min.css" />
}

<h2>Edit</h2>

@using (Html.BeginForm("Edit", null, FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Event</legend>

        <div class="control-group">
            <div class="fileupload fileupload-new" data-provides="fileupload">
                @Html.HiddenFor(model => model.PicturePath)
                <div class="fileupload-preview thumbnail" style="width: 980px; height: 250px;"></div>
                <div>
                    <span class="btn btn-file">
                        <span class="fileupload-new">Izaberite sliku</span>
                        <span class="fileupload-exists">Promeni</span>
                        <input type="file" name="mediaItemUpload" id="mediaItemUpload" />
                    </span>
                    <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Ukloni</a>
                </div>
            </div>
        </div>

        <div class="control-group">

            @Html.LabelFor(model => model.Title, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Topic, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Topic)
                @Html.ValidationMessageFor(model => model.Topic)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Begin, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Begin)
                @Html.ValidationMessageFor(model => model.Begin)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.End, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.End)
                @Html.ValidationMessageFor(model => model.End)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Venue, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Venue)
                @Html.ValidationMessageFor(model => model.Venue)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Body, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Body)
                @Html.ValidationMessageFor(model => model.Body)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.IsStreamingEvent, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.IsStreamingEvent)                
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.StreamingInstructions, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.StreamingInstructions)               
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Author, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Author)
            </div>
        </div>

        @Html.HiddenFor(model => model.Id)

        <div class="control-group">
            <div class="controls">
                <button type="submit" class="btn btn-success">Snimi <i class="icon-save"></i></button>
            </div>
        </div>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<script>
    @section Scripts {
    @Scripts.Render("~/bundles/controlpanel/event/edit")
}</script>
